package workforecast

class Activity implements Comparable {

	int probability
	String customer
	String description
	int billingPrice	// float or double are not accurate enough when we sum up many values
	int workloadEstimation
	ActivityType activityType
	boolean active
	
	static belongsTo = [forecast: Forecast]
	
    static constraints = {
		customer(blank:true)
		description(blank:true)
    }
	
	int compareTo(obj) {
		id.compareTo(obj.id)
	}
	
	public Activity clone() {
		Activity clone = new Activity()
		
		clone.probability = this.probability
		clone.customer = this.customer
		clone.description = this.description
		clone.billingPrice = this.billingPrice
		clone.workloadEstimation = this.workloadEstimation
		clone.activityType= this.activityType
		
		clone
	}
}
